From 4ab22c2ed9f9e32846aae0b669b45c165d64acdf Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 11 Jul 2005 00:47:00 +0000 Subject: [PATCH] * (bug 2769) Use '-' form for language consistently on command-line * Fixlets to rebuildImages.php: clear memcached, indicate missing --- RELEASE-NOTES | 2 ++ includes/SiteConfiguration.php | 1 + maintenance/rebuildImages.php | 10 ++++++++++ 3 files changed, 13 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f436287d40..ced38e9c08 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -558,6 +558,8 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new. * (bug 2761) fix capitalization of "i" in Turkish * (bug 2789) memcached image metadata now cleared after deletion * Add serialized version number to image metadata cache records +* (bug 2769) Use '-' form for language consistently on command-line +* Fixlets to rebuildImages.php: clear memcached, indicate missing === Caveats === diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index e3befe7dbc..6aa7d4506e 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -94,6 +94,7 @@ class SiteConfiguration { break; } } + $lang = str_replace( '_', '-', $lang ); return array( $site, $lang ); } diff --git a/maintenance/rebuildImages.php b/maintenance/rebuildImages.php index e3115dcaa2..d14f77b46e 100644 --- a/maintenance/rebuildImages.php +++ b/maintenance/rebuildImages.php @@ -124,6 +124,11 @@ class ImageBuilder extends FiveUpgrade { // Fill in the new image info fields $info = $this->imageInfo( $row->img_name ); + + global $wgMemc, $wgDBname; + $key = $wgDBname . ":Image:" . md5( $row->img_name ); + $wgMemc->delete( $key ); + return array( 'img_width' => $info['width'], 'img_height' => $info['height'], @@ -234,6 +239,11 @@ class ImageBuilder extends FiveUpgrade { } } + if( $filename == '' ) { + $this->log( "Empty filename for $fullpath" ); + return; + } + $fields = array( 'img_name' => $filename, 'img_size' => $size, -- 2.20.1